package com.backend.modules.system.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@Schema(description = "学生参数")
public class StudentDTO {
    
    @Schema(description = "学生ID")
    private Long id;
    
    @Schema(description = "学号", required = true)
    @NotBlank(message = "学号不能为空")
    private String userCode;
    
    @Schema(description = "姓名", required = true)
    @NotBlank(message = "姓名不能为空")
    private String realName;
    
    @Schema(description = "手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
    
    @Schema(description = "邮箱")
    @Email(message = "邮箱格式不正确")
    private String email;
    
    @Schema(description = "班级ID", required = true)
    @NotNull(message = "班级不能为空")
    private Long departmentId;
    
    @Schema(description = "性别(0:未知,1:男,2:女)", required = true)
    @NotNull(message = "性别不能为空")
    private Integer gender;
} 